//设置默认值
const initState = []
//根据搜索框来获取的音乐
export default function (state = initState, action) {
    let { type, payload } = action;
    // console.log(type,payload);
    if (payload) {
        switch (type) {
            case 'GET_SEARCH':
                return [...payload]
            default:
                return state
        }
    } else {
        switch (type) {
            case 'GET_SEARCH':
                return []
            default:
                return state
        }
    }
}